/*
 * Copyright (c) 2023 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef APP_FILE_SERVICE_COMMON_CONST_H
#define APP_FILE_SERVICE_COMMON_CONST_H

#include <string>

namespace OHOS {
namespace AppFileService {
using namespace std;
const string FILE_SCHEME = "file";
const string DATA_SHARE_SCHEME = "datashare";
const string SCHEME_SYMBOLS = "://";
const string PATH_EMPTY_SYMBOLS = "//";
const string PATH_SYMBOL = "/";
const string QUERY_SYMBOL = "?";
const string FRAGMENT_SYMBOLS = "#";
const string NETWORK_ID_TAG = "networkid";
const string EQUAL_SIGN = "=";
const string MEDIA = "/media/";
const string MEDIA_BUNDLE_NAME = "media";
const size_t LENGTH = 1;

const std::string PATH_SHARE = "/data/storage/el2/share";

const string DATA_STORAGE_PATH = "/data/storage/";
const string PACKAGE_NAME_FLAG = "<PackageName>";
const string CURRENT_USER_ID_FLAG = "<currentUserId>";
const string DATA_APP_EL2_PATH = "/data/service/el2/";
const string SHARE_R_PATH = "/r/";
const string SHARE_RW_PATH = "/rw/";
const string SHARE_PATH = "/share/";

const vector<string> SANDBOX_PATH = {
    "/data/storage/el1/bundle",
    "/data/storage/el2/base",
    "/data/storage/el1/database",
    "/data/storage/el2/database",
    "/data/storage/el1/base",
    "/data/storage/ark-cache",
    "/data/storage/ark-profile"
};

const vector<string> LOWER_PATH = {
    "/data/app/el1/bundle/public/<PackageName>",
    "/data/app/el2/<currentUserId>/base/<PackageName>",
    "/data/app/el1/<currentUserId>/database/<PackageName>",
    "/data/app/el2/<currentUserId>/database/<PackageName>",
    "/data/app/el1/<currentUserId>/base/<PackageName>",
    "/data/local/ark-cache/<PackageName>",
    "/data/local/ark-profile/<currentUserId>/<PackageName>"
};

const string MEDIA_GRANT_URI_PERMISSION = "datashare:///media/file_operation/bundle_permission_insert_operation";
const string MEDIALIBRARY_DATA_URI = "datashare:///media";
const string MEDIA_FILEMODE_READONLY = "r";
const string GRANT_URI_NAME = "file_share_grant_uri_permission";
const string PERMISSION_BUNDLE_NAME = "bundle_name";
const string PERMISSION_FILE_ID = "file_id";
const string PERMISSION_MODE = "mode";

} // namespace AppFileService
} // namespace OHOS

#endif